-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugins: Add unit tests for the 'PluginArea' component #49138
Conversation
// Any store update triggers setState and causes PluginArea to rerender. | ||
expect( ComponentSpy ).toHaveBeenCalledTimes( 1 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope to fix this during the refactoring.
Size Change: +608 B (0%) Total Size: 1.34 MB
ℹ️ View Unchanged
|
Flaky tests detected in c610b95. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4465505591
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work adding all these tests 💯
Co-authored-by: Greg Ziółkowski <[email protected]>
Co-authored-by: Greg Ziółkowski <[email protected]>
@gziolo, the RTL does |
Here's the follow-up refactoring PR #49220. |
What?
PR add unit tests for the
PluginArea
component.Why?
I plan to refactor the component to use the
useSyncExternalStore
hook instead of lifecycle methods and thought unit tests would be helpful.Let me know if any cases are missing, and I will gladly include them.
Testing Instructions